import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
// const Admin = () => import( '@/pages/admin/Admin.vue')
// const AdminChild = () => import( '@/components/AdminChild.vue')
// const AdminChild2 = () => import( '@/components/AdminChild2.vue')
const Error = () => import( '@/components/Error.vue')

Vue.use(Router)

export default new Router({
  // mode: 'history',
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    // {
    //   path: '/admin',
    //   // name: 'admin',
    //   component: Admin,
    //   children: [
    //     {
    //       path: '',  //默认
    //       // name:'admin',
    //       component: AdminChild,
    //     },
    //     {
    //       path: 'admin1',  //默认
    //       name:'AdminChild',
    //       component: AdminChild,
    //     },
    //     {
    //       path: 'admin2',  //装修服务
    //       component: AdminChild2,
    //     }
    //   ]
    // },
    {
      path: '*',
      name: 'Error',
      component: Error
    }
  ]
})
